<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

use Mail;

class MailController extends Controller
{
    // 模拟发送邮件

   /* public function send()
    {

        $name = '董卓小蛮腰';
        $flag = Mail::send('emails.test',['name'=>$name],function($message){
            $to = '949656336@qq.com';
            $message ->to($to)->subject('测试邮件');
            //$attachment = storage_path('app/files/test.doc'); //我就纳了闷了,这玩意死活不能发送,这究竟是为啥啊,难道必须是线上环境,本地环境开发不能发送附件吗?
            //$message->attach($attachment,['as'=>"=?UTF-8?B?".base64_encode('测试文档')."?=.txt"]);
        });
        if($flag){
            echo '发送邮件成功，请查收！';
        }else{
            echo '发送邮件失败，请重试！';
        }
    }*/



}
